<template>
  <div class="fr fw itemcenter " style="width: 90%;height: 100%">
    <template v-for="(item,index) in arr">

      <div  class="action fr center">
        <div class=" bc-w br actiondiv fd center itemcenter c-dimgrey fs25 bs  actionhover " style="margin: auto"  @click="cutAction(item.path)" >
         <img style="height: 50%;width: 50%" :src='item.iconimg'/>
          <div class="yellow">{{item.actionName}}</div>
          <!--<img src="../../assets/icon/OrdersStatistics.vue.png"></img>-->
        </div>
      </div>

    </template>
    <div  class="action fr center  itemcenter ">
      <div class=" bc-w br actiondiv fd center itemcenter c-dimgrey fs25 bs actionhover" @click="exitId">
        <img style="height: 50%;width: 50%" :src='exitUser.iconimg'/>
        <div class="yellow">{{exitUser.actionName}}</div>
        <!--<img src="../../assets/icon/OrdersStatistics.vue.png"></img>-->
      </div>
    </div>
    <!--所有的功能-->
    <!--<el-button type="primary" @click="setTime">设置时间</el-button>-->
    <!--<el-button type="success"@click="setPrice">设置价格</el-button>-->
  </div>
</template>

<script>
  // import '../../assets/icon/icon/iconfont.css'
  export default {
    name: "ActionList",
    data() {
      return {
        exitUser:
          {actionName: '切换账号', iconimg: require('../../assets/icon/switchoverUserId.png'),path:'/switchoverUserId',num:8},
      }
    },
    methods: {
      exitId(){
        this.$confirm('是否退出?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$message({
            type: 'success',
            message: '已退出!'
          });
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '取消退出'
          });
        });
      },
      setTime() {
        console.log('路由到设置时间')
        this.$router.push({path: "/SetTime"})
      },
      setPrice() {
        console.log('路由到设置价格')
        this.$router.push({path: "/SetPrice"})
      },
      cutAction(path){
        console.log('点击功能',path)
        console.log('路由到设置价格')
        this.$router.push({path: path})
      }
    },
    created(){
      console.log(this.$store.getters.getMassageNum)
      console.log(this.$store.getters.getMssageJurisdiction[this.$store.getters.getMassageNum])
      console.log(this.$store.getters.getMassageArr)
      this.arr=this.$store.getters.getMassageArr
    }

  }

</script>

<style scoped>

</style>
